<template>
	<view class="container">
		<u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-name="arrow-leftward"
			back-icon-size="35" :background="{ background: '#fff' }" title="事件详情" title-color="#000">
		</u-navbar>

		<u-form :model="form" ref="uForm" label-width="140rpx">
			<u-form-item label="请输入问题描述" label-position="top">
				<u-input v-model="form.name" type="textarea" /></u-form-item>
			<u-form-item label="上报位置">
				<u-input v-model="form.intro" type="select" @click="addrShow = true"  />
				<u-picker v-model="addrShow" mode="region"></u-picker>
			</u-form-item>
			<u-form-item label="详细地址">
				<u-input v-model="form.sex" />
			</u-form-item>
			<u-form-item label="所属网格">
				<u-checkbox-group>
					<u-checkbox v-model="item.checked" v-for="(item, index) in checkboxList" :key="index"
						:name="item.name">
						{{ item.name }}
					</u-checkbox>
				</u-checkbox-group>
			</u-form-item>
			<u-form-item label="突击事件">
				<u-switch v-model="checked"></u-switch>
			</u-form-item>
			<u-form-item label="事件分类">
				<u-input v-model="form.intro" type="select" @click="categoryShow = true"  />
				<u-picker mode="multiSelector" v-model="categoryShow" :range="multiSelector" :default-selector='[0, 1, 3]'></u-picker>
			</u-form-item>
			<u-form-item label="事件图片" label-position="top">
				<u-upload :action="action" :file-list="fileList"></u-upload>
			</u-form-item>
		</u-form>
		<view class="footer">
			<u-button type="error" @click="showReturn=true">取消</u-button>
			<u-button type="primary" @click="handleVerify">上报</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {},
				addrShow:false,
				categoryShow:false,
				border: true,
				multiSelector: [
					[1, 2, 3], 
					[4, 5, 6]
				],
			};
		},
		methods: {
			handleChange(index) {
				this.current = index;
			},
		}
	}
</script>
<style lang="scss" scoped>
	.container {
		.header {
			position: fixed;
			top: 0;
			left: 0;
			right: 0;
			z-index: 5;
			background-color: #fff;
		}
	}

	.event-list {
		flex: 1;
		overflow-y: auto;
	}

	.event-list-cell {
		border-radius: 8rpx;
		background-color: #fff;
		margin: 16rpx;
		padding: 16rpx;

		.time {
			display: flex;
		}
	}
	.footer {
		display: flex;
	}
</style>